package com.gzx.plugin.tjzy.modular.call.receipt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gzx.plugin.tjzy.modular.call.receipt.entity.GzxHtCallReceipt;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

/**
 * @author zjt
 * @description
 * @date 2025/3/28 17:51
 */
public interface GzxHtCallReceiptMapper extends BaseMapper<GzxHtCallReceipt> {

    @Insert("<script>" +
            "INSERT IGNORE INTO gzx_ht_call_receipt (" +
            "id,business, call_type, call_id, agent_num, user_name, caller, callee, ring_time," +
            "ring_duration, connect_time, start_time, end_time, call_duration, file_url, area," +
            "result, `signal`, task_id, import_time, add_time, acd_end_time, acd_duration," +
            "invite_comments, myd_key, asr_code, asr_name, company_name,create_time) VALUES (" +
            "#{record.id}, #{record.business}, #{record.callType}, #{record.callId}, #{record.agentNum}, #{record.userName}," +
            "#{record.caller}, #{record.callee}, #{record.ringTime}," +
            "#{record.ringDuration}, #{record.connectTime}, #{record.startTime}, #{record.endTime}," +
            "#{record.callDuration}, #{record.fileUrl}, #{record.area}," +
            "#{record.result}, #{record.signal}, #{record.taskId}, #{record.importTime}," +
            "#{record.addTime}, #{record.acdEndTime}, #{record.acdDuration}," +
            "#{record.inviteComments}, #{record.mydKey}, #{record.asrCode}, #{record.asrName}," +
            "#{record.companyName},#{record.createTime})" +
            "</script>")
    int insertIgnore(@Param("record") GzxHtCallReceipt record);

}
